import axios from '@/utils/request'
const base = '/shopmovie'

export function listCarpool(params) {
  return axios({
    url: `${base}/carpools`,
    method: 'get',
    params: params
  })
}

export function modifyCarpool(id, data) {
  return axios({
    url: `${base}/carpools/` + id,
    method: 'put',
    data
  })
}

export function saveCarpool(data) {
  return axios({
    url: `${base}/carpools`,
    method: 'post',
    data
  })
}

export function deleteCarpool(id) {
  return axios({
    url: `${base}/carpools/${id}`,
    method: 'delete'
  })
}

export function confirmCarpool(id) {
  return axios({
    url: `${base}/carpools/${id}/confirmor`,
    method: 'put'
  })
}

export function dmCarpoolCountReport(data) {
  return axios({
    url: `${base}/carpools/dm/report`,
    method: 'post',
    data
  })
}
